.docs {
    color: #{$white};

    div.results {
        overflow-x: auto;
        margin: 0;
        padding: 0;
        border-top: 2px solid white;

        .code-toolbar {
            display: none !important;
        }

        pre {
            padding: 0 !important;
            border: none;
            margin: 0;
        }

        .overflow-auto {
            margin: 0;
        }

        table {
            margin: 0;
            border-spacing: 0;
            background-color: #{$gray-900};

            tr {
                padding: 0 0.5rem;
            }

            td, th {
                border: 1px solid #{$gray-800};
                padding: 0.1rem 0.5rem;
            }
        }

        .title {
            background-color: #{$gray-700};
            border-start-start-radius: 8px;
            border-start-end-radius: 8px;
            padding: 8px 24px;
            background-color: #{$gray-700};
            color: #{$gray-100};
        }

        &.with-title {
            pre {
                padding: 12px 24px;
                border-start-start-radius: 0px;
                border-start-end-radius: 0px;
            }
        }

        > * {
            margin: 0.5rem 1rem;
        }
    }

    div.code-block {
        overflow-x: auto;
        border-bottom: 2px solid white;

        .title {
            background-color: #{$gray-700};
            border-start-start-radius: 8px;
            border-start-end-radius: 8px;
            padding: 8px 24px;
            color: #{$gray-100};
        }

        pre {
            margin: 0px;
            border: none;
            padding: 0px !important;
        }

        &.with-title {
            .code-toolbar {
                top: -38px;
                background: transparent;
            }

            &:hover {
                .code-toolbar {
                    color: #{$slate-tint-500};                    
                }
            }

            pre {
                overflow: visible;
                padding: 12px 24px;
                border-start-start-radius: 0px;
                border-start-end-radius: 0px;
            }
        }
        
        .execution-time {
            display: flex; 
            align-items: center;
            gap: 6px;
            border-top: 2px solid $slate-tint-1000;
            background-color: #{$gray-600};
            padding: 12px;
            color: #{$gray-100};

            span.material-symbols-outlined {
                font-size: 1rem;
                color: #{$purple};
            }
        }
    }

    table {
        @extend .table-sm;
        color: #{$white};
    
        tbody {
            tr {
                font-weight: #{$font-weight-normal} !important;
                &:hover {
                    color: #{$white};
                    background-color: transparent;
                }
            }
        }
    }

    pre {
        background-color: #{$gray-600};
        border-radius: #{$border-radius};
        padding: 0;
        position: relative;

        code {
            border: none;
            white-space: inherit;
            padding: 0;
        }

        .code-toolbar {
            display: none;
            z-index: 1;
            border: 2px solid white;
            border-bottom-left-radius: 8px;
            border-top-right-radius: 8px;
            right: -2px;
            top: -2px;
        }

        .cm-gutters {
            background: $gray-800;
        }

        .cm-activeLineGutter {
            background: $gray-800;
        }

        .cm-content {
            padding: 0.75rem;
        }
    }

    pre:hover {
        .code-toolbar {
            display: flex;
        }
    }

    code, .code-multi-line {
        @extend .rounded-1;

        color: #{$gray-100};
        background-color: #{$gray-600};
        border: 1px solid #{$slate-tint-1000};
        padding: 2px;
        white-space: nowrap;
        font-size: 0.875em;
    }

    img {
        @extend .img-fluid;
        margin-top: 1rem;
        border-radius: #{$border-radius};
    }

    .alert p:last-of-type {
        margin-bottom: 0;
    }

    blockquote {
        padding: 0 2rem;
    }

    figure {
        @extend .my-3;
    }

    li:not(.nav-item) {
        margin: 0.8rem 0;
    }

    // Gitbook blog author block
    h1 {
        + div:first-of-type[align="left"] {
            float: left;
            height: 54px;
            width: 54px;
            display: inline-block;
            margin-right: 1rem;

            figure {
                margin: 0 !important;

                img {
                    margin: 0 !important;
                    border-radius: 50%;
                }
            }

            + p {
                margin: 0;
            }

            + p + p {
                margin-bottom: 2rem;
            }
        }
    }

    figure {
        display: flex;
        flex-direction: column;
        img, figcaption {
            margin-left: auto;
            margin-right: auto;
        }
    }

    // Codemirror overrideds
    .cm-editor {
        background: inherit;
    }

    .cm-gutters {
        background: inherit;
        border-right: 1px solid #{$white};
    }
    
    .code-highlight {
        background: blue;
    }

    .cm-activeLine {
        background-color: transparent;
    }

    .line-numbers {
        .cm-gutters {
            display: contents !important;
        }
    }

    h1, h2, h3, h4, h5, h6 {
        scroll-margin-top: 108px;

        a {
            color: inherit !important;
            &:hover {
                &:after {
                    content: '#';
                    margin-left: 0.2em;
                    position: absolute;
                }
            }
        }
    }
}

